﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Viking
{
    class HelpMenuScreen : MenuScreen
    {
         /// <summary>
        /// Constructor fills in the menu contents.
        /// </summary>
        public HelpMenuScreen()
            : base("Help")
        {
            // Create our menu entries.
            MenuEntry storyMenuEntry = new MenuEntry("Story");
            MenuEntry controlsMenuEntry = new MenuEntry("Controls");
            MenuEntry back = new MenuEntry("Back");

            // Hook up menu event handlers.
            storyMenuEntry.Selected += StoryMenuEntrySelected;
            controlsMenuEntry.Selected += ControlsEntrySelected;
            back.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(storyMenuEntry);
            MenuEntries.Add(controlsMenuEntry);
            MenuEntries.Add(back);
        }


        #region Handle Input


        /// <summary>
        /// Event handler for when the Play Game menu entry is selected.
        /// </summary>
        void StoryMenuEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            //load screen with story text
            ScreenManager.AddScreen(new StoryMenuScreen(), e.PlayerIndex);
        }
        void ControlsEntrySelected(object sender, PlayerIndexEventArgs e)
        {
            //load screen with control instructions
            ScreenManager.AddScreen(new ControlsMenuScreen(), e.PlayerIndex);
        }
        #endregion
    }
}
